import collections
class Solution(object):
    def findingUsersActiveMinutes(self, logs, k):
        ans = [0] * k
        d = collections.defaultdict(set)
        for id, min in logs:
            d[id].add(min)
        for key in d:
            ans[len(d[key]) - 1] += 1
        return ans